﻿using System;
using System.Web.Mvc;

namespace Pay.Web.Controllers {
	public class HomeController : Controller {
		public ActionResult Index() {
			var mvcName = typeof(Controller).Assembly.GetName();
			var isMono = Type.GetType("Mono.Runtime") != null;

			ViewData["Version"] = mvcName.Version.Major + "." + mvcName.Version.Minor;
			ViewData["Runtime"] = isMono ? "Mono" : ".NET";

			//string json = "app_id=f6c61712b6854cfd903a63daf65371cd&client_trans_id=201709022002482485530&data={}&trans_timestamp=1504353768963&trans_type=SHORTCUTPAY";
			//var hxdata = new HxDataSign();
			//var sign = RSAFromPkcs.sign2md5(json, hxdata.privateKey, "utf-8");
			//var ok = RSAFromPkcs.verify2md5(json, sign, hxdata.publicKey, "utf-8");
			return View();
		}
	}
}
